package com.mmy.configure;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @vesion 
 * @description 
 * @author liys
 * @date 2021-6-8
 */

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
	
	@Value("${web.upload-path}")
	private String userPath;
	
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
		registry.addResourceHandler("/imges/**").addResourceLocations("userPath");
	}
}
